Made the prior user existence check in LoginForm use DB_MASTER
authorAaron Schulz <aschulz@wikimedia.org>
Fri, 10 Jul 2015 23:18:23 +0000 (16:18 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Fri, 10 Jul 2015 23:45:28 +0000 (16:45 -0700)
commit08698e48e8cf0987b9cbc35653e6cf4352ee3767
treeb542c64702f50dc2022112e320603b1c4e7acf44
parent49622354b4e539570655e07d3f3ee88f6664af0c
Made the prior user existence check in LoginForm use DB_MASTER

* This helps if multiple account creation attempts were made in a row
  and the slave selected was lagged (either too much for Chronology
  Protector or the user did not resend the cookies to link the session).
* The locking also better handles concurrent attempt to make another
  account, especially with CentralAuth trying to make external accounts.
  This assumes that the rate of concurrent account creations with close
  names is low enough given trx speed to avoid gap locking issues. This
  will need to be confirmed with low error log rates to be sure.
* The User::idFromName() method now includes a $flags parameter.

Bug: T104615
Change-Id: I8385526a19efc528a016ad2bbf376b377138966b
includes/User.php
includes/specials/SpecialUserlogin.php